﻿Imports extremo

Public Class NuevoEvento
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        Try
            Dim negocio = New EventoNegocio
            negocio.insertar(Me.txtIdproveedor.Text, Me.txtIddeporte.Text, Me.txtUbicacion.Text, Me.txtDescripcion.Text, Me.txtFecha.Text)

            Me.txtIdproveedor.Text = ""
            Me.txtIddeporte.Text = ""
            Me.txtUbicacion.Text = ""
            Me.txtDescripcion.Text = ""
            Me.txtFecha.Text = ""


            Response.Write("Se insertó correctamente")

        Catch ex As Exception
            Response.Write("Problemas al insertar")
        End Try
    End Sub




    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click
        Response.Redirect("Evento.aspx", True)
    End Sub
End Class